package com.surelution.cppei.weixin.gate

class QrAssign {

    static constraints = {
    }
	
	SubAccount subAccount
	
	/**
	 * included
	 */
	Integer codeFrom
	
	/**
	 * included
	 */
	Integer codeTo
	
	public static SubAccount findByQrscene(Integer code) {
		def sas = QrAssign.findAllByCodeFromLessThanEqualsAndCodeToGreaterThanEquals(code, code)
		if(sas) {
			return sas[0].subAccount
		}
		return null
	}
}
